<?php

require_once dirname(__FILE__) . '/../Space.php';

class Board_Space_IncomeTax extends Board_Space
{
    public function onLand($player)
    {
        $balance = $player->getBalance();

        $tax_amount = $balance * .10;

        $deduction_amount = $tax_amount < 200 ? $tax_amount : 200;

        $player->withdraw($deduction_amount);
    }
}
